import {createRouter, createWebHashHistory} from 'vue-router';

const routes = [

    {
        path: "/", name: "Layout", component: () => import("../views/Layout.vue"), children: [
            {path: "/dashboard", name: "Dashboard", component: () => import("../views/Dashboard.vue")},
            {
                path: "/app/pageList",
                name: "AppPageList",
                props: true,
                component: () => import("../views/app/PageList.vue")
            },
            {
                path: "/api/pageList",
                name: "ApiPageList",
                props: true,
                component: () => import("../views/api/PageList.vue")
            },
            {
                path: "/namespace/pageList",
                name: "NamespacePageList",
                props: true,
                component: () => import("../views/namespace/PageList.vue")
            },
            {
                path: "/dataset/pageList",
                name: "DatasetPageList",
                props: true,
                component: () => import("../views/dataset/PageList.vue")
            },
            {
                path: "/datasource/pageList",
                name: "DatasourcePageList",
                props: true,
                component: () => import("../views/datasource/PageList.vue")
            },
        ]
    },
    {
        path: "/reqLog/pageList",
        name: "ReqLogPageList",
        props: true,
        component: () => import("../views/reqlog/PageList.vue")
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router